<template>
  <el-pagination
      @current-change="handleCurrentChange"
      @size-change="handleSizeChange"
      :current-page="pageItem.currentPage"
      :page-sizes="[10, 20, 30, 50]"
      :page-size="pageItem.size"
      layout=" sizes, prev, pager, next, jumper"
      style="margin:20px 0; float:right"
      background
      :total="total">
    </el-pagination>
</template>

<script>
export default {
  props: {
    total: {
      type: Number,
      required: true
    },
    arr: {
      type: Array,
      required: true
    },
    pageItem: {
      type: Object,
      required: true
    },
    arrItem: {
      type: [Object, Array],
      required: true
    }
  },
  data () {
    return {

    }
  },

  created () {
    console.log(this.arr)
  },

  methods: {
    handleCurrentChange (val) {
      // console.log(`当前页: ${val}`)
      this.$emit('CurrentChange', val)
    },
    handleSizeChange (val) {
      this.$emit('SizeChange', val)
    }
  }
}
</script>

<style scoped>

</style>
